﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;

namespace ProjectSem40701
{
    public partial class ArticleDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Fill_data();
        }
        private void Fill_data()
        {
            try
            {
                int ArticleID = Convert.ToInt32(Request.QueryString["ArticleID"].ToString());
                Admin.AdminXSD.ArticleTableAdapters.tbl_ArticleTableAdapter dp = 
                    new Admin.AdminXSD.ArticleTableAdapters.tbl_ArticleTableAdapter();

                DataTable dttbl = dp.Get_tbl_Article_Select_All_By_ArticleID(ArticleID);
            }
            catch
            {
                //this.BtnCart.Enabled = false;
            }

        }

        protected void lblContent_DataBinding(object sender, EventArgs e)
        {
            Label lblContent = (Label)sender;
            lblContent.Text = Server.HtmlDecode(lblContent.Text);
        }

        protected void imgArticle_DataBinding(object sender, EventArgs e)
        {
            Image imgArticle = (Image)sender;
            if (imgArticle.ImageUrl.ToLower().EndsWith("news1-1.jpg"))
            {
                imgArticle.Visible = true;
            }
        }

    }
}
